<template>
	<div>
		<div class="img">
			<h2>处女座</h2>
		</div>
		<div>
			<van-tabs v-model="active" swipeable>
			            <van-tab v-for="(items,index) in navArr" :key='index' :title="items.name" class="v-tab">
			                <div v-if="index==0">
			                     <div v-if="list">
									 <div v-for="(item,i) in list" :key='i'>
										 {{item.day.color}}
									 </div>
								 </div>
			                </div>
							
							
			                <div v-if="index==1">我是二个</div>
			                <div v-if="index==2">我是第三个</div>
			            </van-tab>
			
			 </van-tabs>
		</div>

	</div>
</template>

<script>
	export default {
		name: '',
		data() {
			return {
				list: null,
				active: 0,
				navArr: [{
						name: "本月"
					},
					{
						name: "本年"
					},
					{
						name: "日运"
					},
					{
						name: "明日"
					},
					{
						name: "本周"
					}
				],
			}



		
	},
	mounted() {
			wx.showLoading({
				title: '请求中'
			})
			wx.cloud.database().collection('wh04star').get()
				.then(res => {
					this.list = res.data
					console.log(this.list)
					wx.hideLoading();
					wx.showToast({
						title: '请求成功'
					})
				})
		},
		onLoad() {

		},
		methods: {
		
		},
		mounted() {
			
		},
		onLoad(op) {
			// console.log(22222)
			console.log(op);
		}
	}
</script>

<style>
	.img {
		width: 100%;
		height: 150px;
		background: #C0D9D9;
		overflow: hidden;
	}

	h2 {
		font-size: 30px;
		color: white;
		margin-top: 70px;
		margin-left: 10px;
	}
</style>
